package application.view.viewComponent 
{
	import application.model.VO.LayoutVO;
	import flash.display.Sprite;
	import ginger.ui.simpleControls.SimpleLayout;
	/**
	 * ...
	 * @author Ning
	 */
	public class LayoutView extends Sprite implements ILayout
	{
		protected var layoutData:LayoutVO;
        public function LayoutView():void
		{
			
		}
		public function updateLayout(ly:LayoutVO):void
		{
			layoutData = ly;
			layout();
		}
		public function layout():void
		{
			if (layoutData) {
				SimpleLayout.layout(this,
								   AppGlobal.STAGE,
								   layoutData.anchorType,
								   layoutData.left,
								   layoutData.right,
								   layoutData.top,
								   layoutData.bottom,
								   layoutData.centerX,
								   layoutData.centerY,
								   layoutData.targetRect);
			}
		}
	}
}